<?php if(isset($_POST['id']))
    $mode = $_POST['mode'];
    
    if($mode == "d")
    {
        if($deleteNews)
            trace("News Deleted");
        else
            trace("Error deleting news " . mysql_error());
        
        exit();
        trace("TEH FAILS");        
    }

    else
    {
        while($row = mysql_fetch_array($selectNews))
        {
            trace($row['title'] . " : " . $row['date'] . " <a href='index.php?content=vnews&id=$row[id]'>View</a> : <a href='index.php?content=enews&id=$row[id]'>Edit</a> : <a href='index.php?content=mnews&id=$row[id]&mode=d'>Delete</a>");
        } 
    }
?>